import RPi.GPIO as GPIO

import time
GPIO.setmode(GPIO.BCM)
#GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)

LEFT1=17
LEFT2=18
RIGHT1=23
RIGHT2=24

GPIO.setup(LEFT1,GPIO.OUT)
GPIO.setup(LEFT2,GPIO.OUT)
GPIO.setup(RIGHT1,GPIO.OUT)
GPIO.setup(RIGHT2,GPIO.OUT)

def t_stop():
    GPIO.output(LEFT1, False)
    GPIO.output(LEFT2, False)
    GPIO.output(RIGHT1, False)
    GPIO.output(RIGHT2, False)

def t_down():
    GPIO.output(LEFT1, True)
    GPIO.output(LEFT2, False)
    GPIO.output(RIGHT1, True)
    GPIO.output(RIGHT2, False)

def t_up():
    GPIO.output(LEFT1, False)
    GPIO.output(LEFT2, True)
    GPIO.output(RIGHT1, False)
    GPIO.output(RIGHT2, True)

def t_left():
    GPIO.output(LEFT1, False)
    GPIO.output(LEFT2, True)
    GPIO.output(RIGHT1, True)
    GPIO.output(RIGHT2, False)

def t_right():
    GPIO.output(LEFT1, True)
    GPIO.output(LEFT2, False)
    GPIO.output(RIGHT1, False)
    GPIO.output(RIGHT2, True)


while True:
        t_up()
